﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Configuration;
using System.Web;
using CHPM.IC.Logger;

namespace CHPM.SL.TheService.Code.ErrorHandling
{
    public class ErrorHandlerBehavior : BehaviorExtensionElement
    {
        private readonly ILogger _logger;
        public ErrorHandlerBehavior(ILogger logger)
        {
            _logger = logger;
        }

        public override Type BehaviorType
        {
            get { return typeof(ErrorServiceBehavior); }
        }

        protected override object CreateBehavior()
        {
            return new ErrorServiceBehavior(_logger);
        }
    }
}